package com.wy.dao;

import com.wy.pojo.Huzu;
import com.wy.pojo.Tousu;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface TousuDao extends JpaRepository<Tousu,Integer> {

/*    @Override
    Page<Dog> findAll(Pageable pageable);*/


    /**
     *  模糊查询或者等值查询
     * @param example
     * @param pageable
     * @return
     */
    @Override
    Page findAll(Example example, Pageable pageable);

    @Query("update Tousu set sljeg=?2,sf=?3,pingj=?4 where id=?1")
    @Modifying
    public void updateRecord(Integer id,String sljeg,String sf,String pingj);
}
